package com.qutan.app.core.repository;

import com.qutan.app.core.domain.Friend;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by pwy on 16/5/15
 */
@Repository
public interface FriendRepository extends JpaRepository<Friend, Long>, JpaSpecificationExecutor {

    List<Friend>findByUserId(long userId);

    Friend findByUserIdAndFriendId(long userId,long friend);
}